import Nav from '../../src/components/common/nav/nav.vue'
import {ApiUrl,Islogined,returnId,show,hide} from './ApiUrl.js'
import loading from '../../src/components/common/loading/loading.vue'
import fangerror from '../../src/components/common/fangerror/fangerror.vue'
import {timerScale} from '../plugins/scale/self_adaption_scale'
require("./lib/select2/js/select2.min");
export default {
  components: {
    meun:Nav,loading,fangerror,
  },
  data(){
    return {
      FangLoading:false,//Loading控制，true显示，false不显示
      fangerroring:false,//提示文本弹窗，true显示，false不显示
      fangerrorText:'',//提示文本弹窗内容
      headerTitle:'指标详情',
      contentTitle:'砼含量分析',
      isRed: false,
      tableData:[]
    }
  },
  created: function() {

  },
  mounted(){
    let _This = this;
    $('.select2-dropdown').remove();
    $('select').select2({
      language: "zh-CN",
    });

    let windowH = $(window).height();
    let meunBoxH = $('.meunBox').outerHeight(true);
    let megessBoxH = $('.megessBox').outerHeight(true);
    $('.contentLeft,.contentRight').height( windowH - meunBoxH - megessBoxH );
    $('.tab_box').height(windowH - meunBoxH);
    _This.getTableData()
  },
  methods:{
    setTimeoutError:function () {
      setTimeout(() => {
        $('.Fang_errorBox').hide();
        this.fangerroring = false
      }, 2000)
    },
    backDetail:function () {
      this.isRed = true;  //返回按钮变红色
      // this.$router.push({path: 'detail'});
      this.$router.back(-1);
    },
    getTableData:function () {
      let _This = this;
      let id = _This.$route.query.id;
      let params = {
        integrationId:id,
        page:1,
        pageSize:8
      };
      _This.FnAxiosAjax('post','/api/matfeatures/list',params,function (data) {
          _This.tableData = data.results;
        console.log(_This.tableData);
      })
    },

  }
}
